package com.himooc.jdk8.lambda;

import java.time.LocalDateTime;

import org.junit.Test;

/**
 * 测试LocalDateTime
 * 
 * @author David Chen
 *
 */
public class TestLocalDateTime {

	@Test
	public void testLocalDateTime() {
		LocalDateTime dateTime = LocalDateTime.now();
		
		System.out.print(dateTime.getYear() + "年");
		System.out.print(dateTime.getMonthValue() + "月");
		System.out.print(dateTime.getDayOfMonth() + "日");
		System.out.print(dateTime.getHour() + "时");
		System.out.print(dateTime.getMinute() + "分");
		System.out.println(dateTime.getSecond() + "秒");
		
		System.out.println(dateTime.toString());
	}
	
}
